<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>磁阻效应</title>
	</head>
	<body>
		<button onclick="console.table(ua)">Ua</button><br /><br />
		<button onclick="console.table(ba)">Ba</button><br /><br />
		<button onclick="console.table(ub)">Ub</button><br /><br />
		<button onclick="console.table(bb)">Bb</button><br /><br />
		<button onclick="console.table(bc)">B(a+b)</button><br /><br />
		<button onclick="console.table(uc)">U(a+b)</button><br /><br />
		<button onclick="console.table(baADDbb)">Ba + Bb</button><br /><br />
		<button onclick="console.table(e1)">E1</button><br /><br />
		<button onclick="console.table(ud)">U(a-b)</button><br /><br />
		<button onclick="console.table(bd)">B(a-b)</button><br /><br />
		<button onclick="console.table(ba_bb)">Ba - Bb</button><br /><br />
		<button onclick="console.table(e2)">E2</button><br />
		<script src="./data.js"></script>
		<script>
			const $ = Array(11).fill(0);

			const ua = $.map((_, k) => (ua2[k] - ua1[k]) / 2);

			const ub = $.map((_, k) => (ub2[k] - ub1[k]) / 2);

			const ba = $.map((_, k) => (ua2[k] - ua1[k]) / (2 * UE * S));

			const bb = $.map((_, k) => (ub2[k] - ub1[k]) / (2 * UE * S));

			const uc = $.map((_, k) => (uc2[k] - uc1[k]) / 2);

			const bc = $.map((_, k) => (uc2[k] - uc1[k]) / (2 * UE * S));

			const ud = $.map((_, k) => (ud2[k] - ud1[k]) / 2);

			const bd = $.map((_, k) => (ud2[k] - ud1[k]) / (2 * UE * S));

			const baADDbb = $.map((_, k) => ba[k] + bb[k]);

			const ba_bb = $.map((_, k) => ba[k] - bb[k]);

			const e1 = $.map((_, k) =>
				Math.abs(((bc[k] - baADDbb[k]) / bc[k]) * 100)
			);

			const e2 = $.map((_, k) => Math.abs(((bd[k] - ba_bb[k]) / bd[k]) * 100));
		</script>
	</body>
</html>
